package com.tuling.designpattern.strategy;

/**
 * @author it-小林
 * @desc   打折收费子类
 * @date 2021年09月28日 9:49
 */
public class CashRebate extends CashSuper {

    private double moneyRebate = 1; //折扣

    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
